package com.jeff.serviceImpl;

import com.jeff.mapper.FormDataMapper;
import com.jeff.mybatis.page.Page;
import com.jeff.po.FormData;
import com.jeff.service.FormDataService;
import com.jeff.vo.FormDetailVo;
import com.jeff.vo.FormPeopleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FormDataServiceImpl extends BaseServiceImpl<FormData, String> implements FormDataService {
    @Autowired
    private FormDataMapper formDataMapper;

    @Autowired
    public void setBaseMapper() {
        super.setBaseMapper(formDataMapper);
    }

    @Override
    public int batchData(List<FormData> formDataList) {
        return formDataMapper.batchData(formDataList);
    }

    @Override
    public Page<FormPeopleVo> summaryByFormIdByPage(String id) {
        return this.buildVoPage(formDataMapper.summaryByFormIdByPage(id));
    }

    @Override
    public List<FormDetailVo> getFormDetail(String id) {
        return formDataMapper.getFormDetail(id);
    }
}
